<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<!-- rgb(0,0,0) -->
		<script type="text/javascript">
			function getColor(){
				
				var r=Math.floor(Math.random()*256)
				var g=Math.floor(Math.random()*256)
				var b=Math.floor(Math.random()*256)
				return "rgb("+r+","+g+","+b+")"
			}
			function fun(){
				document.body.setAttribute("style","background-color: "+getColor()+";")
		
			}
		</script>
	</head>
	<body>
		<button type="button" onclick="fun()">改变颜色</button>
	</body>
</html>
